package com.autumn.oauth2.zero.domain.entities;

import javax.persistence.Column;

import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.StringTypeHandler;

import com.autumn.domain.entities.AbstractDefaultEntity;
import com.autumn.mybatis.mapper.annotation.ColumnOrder;
import com.autumn.mybatis.mapper.annotation.ColumnType;
import com.autumn.mybatis.mapper.annotation.Index;

/**
 * 授限资源抽象
 * 
 * @author 老码农 2018-04-09 23:27:58
 */
public abstract class AbstractAuthResources extends AbstractDefaultEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -211568442575443652L;

	@ColumnOrder(1)
	@Column(name = "name", length = 100, nullable = false)
	@Index
	private String name;
	@ColumnOrder(2)
	@Column(name = "authority", length = 100, nullable = false)
	@Index
	private String authority;
	@ColumnOrder(3)
	@Column(name = "remark", nullable = false)
	@ColumnType(jdbcType = JdbcType.BLOB, typeHandlerClass = StringTypeHandler.class)
	private String remark;

	/**
	 * 获取资源名称
	 * 
	 * @return
	 */
	public String getName() {
		return name;
	}

	/**
	 * 设置资源名称
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 获取权限
	 * 
	 * @return
	 */
	public String getAuthority() {
		return authority;
	}

	/**
	 * 设置权限
	 * 
	 * @param authority
	 *            权限
	 */
	public void setAuthority(String authority) {
		this.authority = authority;
	}

	/**
	 * 获取备注
	 * 
	 * @return
	 */
	public String getRemark() {
		return remark;
	}

	/**
	 * 设置备注
	 * 
	 * @param remark
	 *            备注
	 */
	public void setRemark(String remark) {
		this.remark = remark;
	}
}
